import AccountPeriodDefineComp from "containers/finance-setting/account-period-define/account-period-define";
import SetOfBooksComp from "containers/finance-setting/set-of-books/set-of-books";
import AccountPeriodControlComp from "containers/finance-setting/account-period-control/account-period-control";
import AccountPeriodDetailComp from "containers/finance-setting/account-period-control/account-period-detail";
import AutoAuditComp from "containers/finance-setting/auto-audit/auto-audit";
import AutoAuditDetailComp from "containers/finance-setting/auto-audit/auto-audit-detail";
import AuditOpinionComp from "containers/finance-setting/audit-opinion/audit-opinion"
import InvoiceTypeComp from "containers/finance-setting/tax-code/tax-code/invoice-type";
import TaxCodeClassifyComp from "containers/finance-setting/tax-code/tax-code/invoice-type/tax-code-classify";
import InvoiceTypeRuleComp from "containers/finance-setting/tax-code/tax-code/invoice-type/invoice-type-rule";
import TaxCodeComp from "containers/finance-setting/tax-code/tax-code";
import LoanMaxComp from "containers/finance-setting/loan-max/loan-max";
import SetOfBookSettingComp from "containers/finance-setting/set-of-books/set-of-book-setting";
import AuditOpinionDetailComp from "containers/finance-setting/audit-opinion/audit-opinion-detail";


//财务设置
const financeSetting = {
  key:'finance-setting',
  icon: 'setting',
  admin: true,
  subMenu: [
    //会计期间定义
    {
      key:'account-period-define',
      url:'/main/finance-setting/account-period-define',
      components: AccountPeriodDefineComp,
      parent: 'finance-setting',
      tenant: true,

      children:{}
    },
    //账套定义
    {
      key:'set-of-books',
      url:'/main/finance-setting/set-of-books',
      components: SetOfBooksComp,
      parent: 'finance-setting',
      children:{
        //帐套设置
        setOfBookSetting:{
          key: 'set-of-book-setting',
          url: '/main/finance-setting/set-of-books/set-of-books-setting',
          components: SetOfBookSettingComp,
          parent: 'set-of-books'
        }
      }
    },
    //自动审核
    {
      key: 'auto-audit',
      url: '/main/finance-setting/auto-audit',
      hideInUrl: ['console-my.huilianyi.com', 'console-sg.huilianyi.com'],
      components: AutoAuditComp,
      parent: 'finance-setting',
      children: {
        //自动审核规则详情
        autoAuditDetail: {
          key: 'auto-audit-detail',
          url: '/main/finance-setting/auto-audit/auto-audit-detail',
          components: AutoAuditDetailComp,
          parent: 'auto-audit',
        }
      }
    },
    //会计期间控制
    {
      key:'account-period-control',
      url:'/main/finance-setting/account-period-control',
      components: AccountPeriodControlComp,
      parent: 'finance-setting',
      tenant: true,

      children:{
        //会计期间信息详情
        accountPeriodDetail: {
          key:'account-period-detail',
          url:'/main/finance-setting/account-period-control/account-period-detail/:periodSetId/:setOfBooksId',
          components: AccountPeriodDetailComp,
          parent: 'account-period-control'
        }
      }
    },
    //审核意见
    {
      key: 'audit-opinion',
      url: '/main/finance-setting/audit-opinion',
      hideInUrl: ['console-my.huilianyi.com', 'console-sg.huilianyi.com'],
      components: AuditOpinionComp,
      parent: 'finance-setting',
      children: {
        // 审核意见详情
        auditOpinionDetail: {
          key: 'audit-opinion-detail',
          url: '/main/finance-setting/audit-opinion/audit-opinion-detail/:id',
          components: AuditOpinionDetailComp,
          parent: 'audit-opinion',
        }
      },
    },
    //税务编码维护
    {
      key: 'tax-code',
      components: TaxCodeComp,
      url: '/main/finance-setting/tax-code',
      hideInUrl: ['console-my.huilianyi.com', 'console-sg.huilianyi.com'],
      parent: 'finance-setting',
      children: {
        //费用分类
        invoiceType: {
          key: 'invoice-type',
          components: InvoiceTypeComp,
          url: '/main/finance-setting/tax-code/invoice-type/:ruleId',
          parent: 'tax-code'
        },
        taxCodeClassify: {
          //税务分类
          key: 'tax-code-classify',
          components: TaxCodeClassifyComp,
          url: '/main/finance-setting/tax-code/invoice-type/tax-code-classify/:audRuleExpTypeId/:ruleId',
          parent: 'invoice-type'
        },
        //发票类型规则
        invoiceTypeRule: {
          key: 'invoice-type-rule',
          components: InvoiceTypeRuleComp,
          url: '/main/finance-setting/tax-code/invoice-type/invoice-type-rule/:audRuleExpTypeId/:ruleId',
          parent: 'invoice-type'
        },
      }
    },
    //借款金额上限控制
    {
      key:'loan-max',
      url:'/main/finance-setting/loan-max',
      components: LoanMaxComp,
      parent: 'finance-setting'
    },
  ]
};

export default financeSetting
